package;

import js.Browser.*;
import lib.THREE;
import lib.THREE.*;


class Main {
	static public function main() {
		var scene = new Scene();
		var camera = new PerspectiveCamera(70, window.innerWidth / window.innerHeight, 1, 1000);
		camera.position.z = 400;

		var render = new WebGLRenderer({antialias: true});
		render.setSize(window.innerWidth, window.innerHeight);
		render.setPixelRatio(window.devicePixelRatio);

		var material = new LineBasicMaterial({color: 0xffff});
		var geometry = new Geometry();
		geometry.vertices.push(new Vector3(-10, 0, 0));
		geometry.vertices.push(new Vector3(0, 10, 0));
		geometry.vertices.push(new Vector3(10, 0, 0));
		geometry.vertices.push(new Vector3(20, 10, 0));

		var line = new Line(geometry, material);

		scene.add(line);

		document.body.appendChild(render.domElement);
		render.render(scene, camera);
	}
}
